<template>
  <el-header>
    <div class="logo">
      <img src="~assets/img/heima.png" />
      <span>电商后台管理系统</span>
    </div>
    <el-button type="danger" @click="logout">退出</el-button>
  </el-header>
</template>

<script>
export default {
  name: 'HeaderArea',
  methods: {
    logout() {
      window.sessionStorage.clear()
      this.$router.push('/login')
    },
  },
}
</script>

<style scoped>
.el-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #b3c0d1;
  color: #fff;
  height: 70px;
  padding-left: 0;
}

.el-header .logo {
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 24px;
  width: 300px;
}
</style>
